home *** CD-ROM | disk | FTP | other *** search
/ Amiga Tools 2 / Amiga Tools 2.iso / grafik / bildanzeiger / superview-lib_dev / example_svoperators / extractgrayscales / sp_recogsubs.c < prev    next >
C/C++ Source or Header  |  1995-03-09  |  1KB  |  55 lines

  1.  
  2.  /* SP_RecogSubs.c
  3.     - Functions for External Module Recognition and Binding -
  4.     (c) 1993-94 by Andreas R. Kleinert
  5.     Last changes : 30.10.1994
  6.  */
  7.  
  8.  
  9. #include "svoperator.h"
  10.  
  11. #include <exec/execbase.h>
  12.  
  13. void __saveds __stdargs SVLI_InitSVDList(void);
  14.  
  15. void __saveds __stdargs SVLI_InitSVDList(void)
  16. {
  17.  struct SVP_OperatorNode *svp_node = N;
  18.  
  19.  SVOperatorBase->svb_SVOperator = N;
  20.  
  21.  if(FindName(&SysBase->LibList, "superview.library"))
  22.   {
  23.    struct SuperViewBase *SuperViewBase = (APTR) OpenLibrary("superview.library", 2);
  24.  
  25.    if(SuperViewBase)
  26.     {
  27.      SVOperatorBase->svb_SVOperator = (APTR) FindName((APTR) &SuperViewBase->svb_SVOperatorList, "SVO.svobject");
  28.  
  29.      CloseLibrary((APTR) SuperViewBase);
  30.     }
  31.   }else
  32.   {
  33.    svp_node = AllocVec(sizeof(struct SVP_OperatorNode), (MEMF_CLEAR|MEMF_PUBLIC));
  34.  
  35.    if(!svp_node) return;
  36.  
  37.    SVOperatorBase->svb_SVOperator = svp_node;
  38.  
  39.    ((struct Node *)svp_node)->ln_Type = NT_UNKNOWN;
  40.    ((struct Node *)svp_node)->ln_Pri  = 1;
  41.    ((struct Node *)svp_node)->ln_Name = svp_node->svp_FileName;
  42.  
  43.    /* don't forget to initialized svp_node->ln_Name :
  44.       inside SVOperators it's not NULL !!
  45.     */
  46.  
  47.    svp_node->svp_Version = SVP_VERSION;
  48.    svp_node->svp_Flags = N;
  49.  
  50.    strcpy(svp_node->svp_FileName, "ExtractGrayScales.svoperator");
  51.    strcpy(svp_node->svp_Description, "Extracts GrayScale values from graphics.");
  52.    strcpy(svp_node->svp_Author,      "(c) 1994 Andreas R. Kleinert");
  53.   }
  54. }
  55.